@echo off
set "parent_dir=%~dp0"
set "Ext=*.jpg,*.png"
for /R "%parent_dir%" %%d in (%Ext%) do (
    cwebp -q 80 %%d -o %%d.webp
)
pause